home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_6.lha / 8_6 / 8_6_over.c < prev    next >
Text File  |  1993-08-08  |  358b  |  17 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / Handle both an uninitialized and a full buffer.
  6. include <limits.h>
  7. nt streambuf::overflow(int c)
  8.  
  9.    if (allocate() == EOF)
  10. return EOF;
  11.  
  12.    if ((c != EOF) && (pptr < eptr))
  13. *pptr++ = c;
  14.  
  15.    return c & UCHAR_MAX;
  16.  
  17.